package com.ruicar.afs.cloud.account.common.processor.impl;

import com.ruicar.afs.cloud.account.common.entity.VoucherFlowInfo;
import com.ruicar.afs.cloud.account.common.processor.AbsBaseRequestMsg;
import com.ruicar.afs.cloud.account.common.processor.IRequest;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumUtil;
import com.ruicar.afs.cloud.voucher.dto.VoucherItemDto;
import lombok.Data;

/**
 * @author infinity
 * @version 1.0
 * @date 2020/7/21 21:10
 */
@Data
public class VoucherItemRequest extends AbsBaseRequestMsg {
    /**
     * 凭证实体
     */
    private VoucherFlowInfo voucherFlowInfo;

    public IRequest get() {
            VoucherItemDto dto = new VoucherItemDto();
            dto.setContractNo(voucherFlowInfo.getContractNo());//合同号
            dto.setDealerName(voucherFlowInfo.getDealerName());
            dto.setFnProName(voucherFlowInfo.getFinancialProducts());
            dto.setTypeName( AfsEnumUtil.desc(voucherFlowInfo.getBusinessType()));
        return IRequest.success(dto);
    }

}
